require
([
    "dijit/layout/BorderContainer",
    "dijit/layout/ContentPane",
    "dojo/dom-construct",
    "dojo/domReady!"
], function(BorderContainer, ContentPane, DomConstruct)
{
    // create the BorderContainer and attach it to our appLayout div
    var appLayout = new BorderContainer
    (
        {
            id: "appLayout",
            design: "headline"
        },
        "appLayout"
    );

    // create and add the BorderContainer edge regions
    appLayout.addChild
    (
        new ContentPane
        ({
            region: "top",
            id: "toolbox",
            "class": "edgePanel",
        })
    );
    appLayout.addChild
    (
        new ContentPane
        ({
            region: "right",
            id: "Properties",
            "class": "edgePanel",
            splitter: true
        })
    );
    
    var AnimMainContainer = new BorderContainer
    (
        {
            region: "center",
            id: "AnimMainContainer",
            design: "headline"
        }
    );
    
    appLayout.addChild(AnimMainContainer);
    
    AnimMainContainer.addChild
    (
        new ContentPane
        ({
            region: "bottom",
            id: "Animation",
            "class": "edgePanel",
            splitter: true
        })
    );
    
    var ViewTreeContainer = new BorderContainer
    (
        {
            region: "center",
            id: "ViewTreeContainer",
            design: "headline"
        }
    );
    
    AnimMainContainer.addChild(ViewTreeContainer);
    
    ViewTreeContainer.addChild
    (
        new ContentPane
        ({
            region: "left",
            id: "HierarchyTree",
            "class": "edgePanel",
            splitter: true
        })
    );
    
    var ViewportContainer = new ContentPane
    ({
        region: "center",
        id: "ViewportContainer",
        "class": "edgePanel",
        splitter: true
    });
    
    ViewTreeContainer.addChild(ViewportContainer);

    var canvas = DomConstruct.create
    (
        "canvas",
        {
            id: "canvas",
            "class": "Viewport",
            oncontextmenu: "event.preventDefault()",
            width: "150",
            height: "600"
            
        },
        "ViewportContainer"
    );

    // start up and do layout
    appLayout.startup();
    
    Module = {canvas: canvas};
    
    require(["a.out.js"],{});
});
